set(root_dir ${CMAKE_CURRENT_SOURCE_DIR})

file(GLOB src_files
    "${root_dir}/*.h"
    "${root_dir}/*.cpp"
)

add_executable(abc-server
    ${src_files}
)

source_group(TREE "${root_dir}/.." FILES ${src_files})

target_link_libraries(abc-server
    abc-util
    abc-book
    abc-git-util
)

add_custom_command(TARGET abc-server POST_BUILD
    COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/update_output_dir.py ${CMAKE_SOURCE_DIR}/prepare $<TARGET_FILE_DIR:abc-server>
)
